﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace TetrisV1._0
{
    public partial class AboutForm : Form
    {
        //声明新窗体
        private Form anotherForm;
        public AboutForm()
        {
            InitializeComponent();
        }

        public AboutForm(Form f)
        {
            this.Owner = f;
            this.StartPosition = FormStartPosition.Manual;
            this.Location = new Point(this.Owner.Location.X, this.Owner.Location.Y);
            InitializeComponent();
        }

        private void BtnBack_Click_Click(object sender, EventArgs e)
        {
            anotherForm = new MainForm(this);//定义新窗体
            this.Hide();//隐藏旧窗体
            anotherForm.ShowDialog();//展示新窗体
            Application.ExitThread();//退出当前线程上的消息循环，并关闭该线程上的所有窗口。
        }

        private void AboutForm_Load(object sender, EventArgs e)
        {

        }
    }
}
